package com.imooc.autoconfig;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author madison
 * {@code @description}
 * {@code @date} 2022/8/14 11:57
 */
public class UserImportSelector implements ImportSelector {
    private static Logger log = LogManager.getLogger();

    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        log.info("调用 UserImportSelector 的 selectImports 方法获取一批类限定名");
//        return new String[]{"com.imooc.autoconfig.User"};
        return new String[]{User.class.getName()};
    }
}
